import Operate from '@/pages/home/common/operate'
import { TargetType } from '@/ts/core'

/** 关系常用类 */
class Relation {
  getRelation() {
    return this._relationModel()
  }
  getSingleMode () {
    return this._relationSingleModel()
  }
  _relationModel() {
    return {
      info: [
        ...Operate.getOperateModel().info,
        {
          infoTitle: '发起群聊',
          infoIcon: 'tmicon-ios-text',
          weidetType: 'search',
          selectTargetType: TargetType.Company
        },
        {
          infoTitle: '新建目录',
          infoIcon: 'tmicon-folderplus-fill',
          weidetType: 'search',
          selectTargetType: TargetType.Company
        },
        {
          infoTitle: '新建应用',
          infoIcon: 'tmicon-database-set',
          weidetType: 'search',
          selectTargetType: TargetType.Company
        },
        {
          infoTitle: '新建分类',
          infoIcon: 'tmicon-fileplus-fill',
          weidetType: 'search',
          selectTargetType: TargetType.Company
        },
        {
          infoTitle: '新建字典',
          infoIcon: 'tmicon-ios-bookmarks',
          weidetType: 'search',
          selectTargetType: TargetType.Company
        },
        {
          infoTitle: '新建属性',
          infoIcon: 'tmicon-ios-snow',
          weidetType: 'search',
          selectTargetType: TargetType.Company
        },
        {
          infoTitle: '新建实体配置',
          infoIcon: 'tmicon-tag-fill',
          weidetType: 'search',
          selectTargetType: TargetType.Company
        },
        {
          infoTitle: '新建事项配置',
          infoIcon: 'tmicon-plus-square-fill',
          weidetType: 'search',
          selectTargetType: TargetType.Company
        },
        {
          infoTitle: '上传文件',
          infoIcon: 'tmicon-cloudupload',
          weidetType: 'search'
        }
      ]
    }
  }
  _relationSingleModel() {
    return {
      infoTitle: '添加好友',
      infoIcon: 'tmicon-md-person',
      weidetType: 'search',
      placeholder: '请输入用户的账号',
      selectTargetType: TargetType.Person
    }
  }
}

export default new Relation()
